/*我的待办item
* 图片+文字+小红点*/

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:frametrim/utility/screen.dart';
import 'package:frametrim/utility/sq_color.dart';
import 'package:badges/badges.dart';

class buildWorkBeachItem extends StatelessWidget {
  final String imgStr;
  final String name;
  final Alignment mAlignment;
  final VoidCallback onPress;

  buildWorkBeachItem(
      {Key? key,
      required this.imgStr,
      required this.name,
      this.mAlignment = Alignment.center,
      required this.onPress});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onPress,
      child: Container(
        alignment:mAlignment,
        width: (Screen.width - 54) / 3,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.start,
          children: [
            Image.asset(imgStr, width: 40, height: 40),
            Text(name,
                style: TextStyle(fontSize: 12, color: SQColor.color_60black))
          ],
        ),
      ),
    );
  }
}
